 
upload();
 
function upload() {
	$.ajax({
		url: urlcore + "/api/shopInfo/statistics",
		type: "get",
		dataType: 'json',
		contentType: "application/json;charset=utf-8",
		success:function(data){
			if (data.success == true) {
				//平台入驻人数
				var shopCount = data.data.shopCount;
				
				 //当日访客量
				var lookTomeTodayCount = data.data.lookTomeTodayCount;
				
				 //订单总成交额
				var orderCount1 = data.data.orderCount1;
				var money1 = data.data.money1;
				
				//当天订单成交额
				var orderCount2 = data.data.orderCount2;
				var money2 = data.data.money2;
				
				//直播审核统计
				var zbDirectSeedingCount = data.data.zbDirectSeedingCount;

                //抢购审核统计
				var rushGoodsCount = data.data.rushGoodsCount;
				var myChart = echarts.init(document.getElementById('main'));
			    // 指定图表的配置项和数据
			    option = {
			        tooltip : {
			            trigger: 'axis',
			            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
			                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			            }
			        }, 
			        legend: {
			            data:['平台入驻人数','当日访客量','订单总成交数','订单总成交额','当天订单成交数','当天订单成交额','直播审核统计','抢购审核统计']
			        },
			        grid: {
			            left: '3%',
			            right: '3%',
			            bottom: '3%',
			            containLabel: true
			        },
			        xAxis : [
			            {
			                type : 'category',
			                data : ['']
			            }
			        ],
			        yAxis : [
			            {
			                type : 'value'
			            }
			        ],
			        series : [
			            {
			                name:'平台入驻人数',
			                type:'bar',
					        data:[shopCount]
			            },
			            {
			                name:'当日访客量',
			                type:'bar',
			                data:[lookTomeTodayCount]
			            },
			            {
			                name:'订单总成交数',
			                type:'bar',
			                data:[orderCount1]
			            },
			            {
			                name:'订单总成交额',
			                type:'bar',
			                data:[money1]
			            },
			            {
			                name:'当天订单成交数',
			                type:'bar',
			                data:[orderCount2]
			            },
			            {
			                name:'抢购审核统计',
			                type:'bar',
			                data:[money2]
			            },
			            {
			                name:'直播审核统计',
			                type:'bar',
			                data:[zbDirectSeedingCount]
			            },
			            {
			                name:'当天订单成交额',
			                type:'bar',
			                data:[rushGoodsCount]
			            }
			        ]
			    };
			
			    // 使用刚指定的配置项和数据显示图表。
			    myChart.setOption(option);
				
				
			} else if (data.code == 'OVERTIME'){
				var thisUrl = window.location.href;
				if (thisUrl.indexOf('login.html') <= -1) {
					top.window.location.href="login.html";
				}
			} else {
				alert(data.msg);
			}

		},
		error:function() {
			/* Act on the event */
			alert("error");
		}
	});

}
 

